<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<style type="text/css">
.dateWidth1{
   width:195px;
}
.select_width{
   width:130px;
}
</style>
<x:parse xml="${param.xmlstr}" var="xmlData" />

<table class="t_css" width="100%" border="0" cellpadding="0" id="basicInfo"
	cellspacing="1">
	<tr>
		<td   colspan="4" class="t_bar2">基本信息</td>
		
	</tr>
	<tr>
		<td   align="right"><span class="color_red">*</span>单位名称：</td>
		<td  colspan="3">
			<input id="zh_title" name="proposal/zh_title" label="单位名称" type="text" required class="input_css required maxlength:100"  style="width: 725px;" maxlength="100" value="<x:out select="$xmlData/data/proposal/zh_title" />"/> 
		</td>
	</tr>
	<tr>
		<td width="18%" align="right"><span class="color_red">*</span>保险公司名称：</td>
		<td width="42%" ><input name="proposal/insurance_comname" label="保险公司名称"
			type="text" required class="input_css required maxlength:100" style="width: 250px;"
			maxlength="100"
			value="<x:out select="$xmlData/data/proposal/insurance_comname" />" /></td>
		<td align="right" width="12%"><span class="color_red">*</span>指南代码：</td>
		<td nowrap  valign="middle"  width="28%" >
		<input name="proposal/guide_code" id="guide_code" value="<x:out select="$xmlData/data/proposal/guide_code" />" class="required" maxlength="20"
			label="指南代码" />
		</td>
	</tr>
	<tr>
		<td align="right" nowrap><span class="color_red">*</span>项目所属产业：</td>
		<td  colspan="3">
		<label> <input type="checkbox" class="do"  style="vertical-align: middle;" name="agricultural_field" label="物联网和云计算 " value="01" /><span style="vertical-align: middle;">物联网和云计算 </span></label> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<label> <input type="checkbox" class="do"  style="vertical-align: middle;" name="agricultural_field" label="节能环保产业" value="02" /><span style="vertical-align: middle;">节能环保产业</span></label> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<label> <input type="checkbox" class="do"  style="vertical-align: middle;" name="agricultural_field" label="软件和服务外包" value="03" /><span style="vertical-align: middle;">软件和服务外包</span></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<label> <input type="checkbox" class="do"  style="vertical-align: middle;" name="agricultural_field" label="新能源和新能源汽车" value="04" /><span style="vertical-align: middle;">新能源和新能源汽车</span></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<label> <input type="checkbox" class="do"  style="vertical-align: middle;" name="agricultural_field" label="生物产业" value="05" /><span style="vertical-align: middle;">生物产业</span></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<label> <input type="checkbox" class="do"  style="vertical-align: middle;" name="agricultural_field" label="文化创意和工业设计" value="06" /><span style="vertical-align: middle;">文化创意和工业设计</span></label><br/>
		<label> <input type="checkbox" class="do"  style="vertical-align: middle;" name="agricultural_field" label="新材料产业" value="07" /><span style="vertical-align: middle;">新材料产业</span></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<label> <input type="checkbox" class="do"  style="vertical-align: middle;" name="agricultural_field" label="微电子产业" value="08" /><span style="vertical-align: middle;">微电子产业</span></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<label> <input type="checkbox" class="do"  style="vertical-align: middle;" name="agricultural_field" label="装备制造业" value="09" /><span style="vertical-align: middle;">装备制造业</span></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<label> <input type="checkbox" class="do"  style="vertical-align: middle;" name="agricultural_field" label="其他产业" value="10" /><span style="vertical-align: middle;">其他产业</span></label>
	    <input type="hidden" name="proposal/agricultural_field_value" id="agricultural_field_value" class="required" value="<x:out select="$xmlData/data/proposal/agricultural_field_value" />" label="项目所属产业" /> 
		<input type="hidden" name="proposal/agricultural_field_name" id="agricultural_field_name" value="<x:out select="$xmlData/data/proposal/agricultural_field_name" />" /></td>
	</tr>
	<tr>
		<td align="right" nowrap><span class="color_red">*</span>投保保险险种：</td>
		<td  colspan="3">
		<label> <input type="checkbox" class="do"  style="vertical-align: middle;" name="insurance_coverage" label="高新技术企业产品研发责任保险  " value="01" /><span style="vertical-align: middle;">高新技术企业产品研发责任保险  </span></label> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<label> <input type="checkbox" class="do"  style="vertical-align: middle;" name="insurance_coverage" label="关键研发设备保险" value="02" /><span style="vertical-align: middle;">关键研发设备保险</span></label> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<label> <input type="checkbox" class="do"  style="vertical-align: middle;" name="insurance_coverage" label="营业中断保险" value="03" /><span style="vertical-align: middle;">营业中断保险</span></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<label> <input type="checkbox" class="do"  style="vertical-align: middle;" name="insurance_coverage" label="出口信用保险" value="04" /><span style="vertical-align: middle;">出口信用保险</span></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<label> <input type="checkbox" class="do"  style="vertical-align: middle;" name="insurance_coverage" label="财产保险" value="05" /><span style="vertical-align: middle;">财产保险</span></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<label> <input type="checkbox" class="do"  style="vertical-align: middle;" name="insurance_coverage" label="产品责任保险" value="06" /><span style="vertical-align: middle;">产品责任保险</span></label><br/>
		<label> <input type="checkbox" class="do"  style="vertical-align: middle;" name="insurance_coverage" label="产品质量保证保险" value="07" /><span style="vertical-align: middle;">产品质量保证保险</span></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<label> <input type="checkbox" class="do"  style="vertical-align: middle;" name="insurance_coverage" label="雇主责任保险" value="08" /><span style="vertical-align: middle;">雇主责任保险</span></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<label> <input type="checkbox" class="do"  style="vertical-align: middle;" name="insurance_coverage" label="产品责任保险" value="09" /><span style="vertical-align: middle;">产品责任保险</span></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<label> <input type="checkbox" class="do"  style="vertical-align: middle;" name="insurance_coverage" label="环境污染责任保险" value="10" /><span style="vertical-align: middle;">环境污染责任保险</span></label>
		<label> <input type="checkbox" class="do"  style="vertical-align: middle;" name="insurance_coverage" label="专利保险" value="11" /><span style="vertical-align: middle;">专利保险</span></label>
		<label> <input type="checkbox" class="do"  style="vertical-align: middle;" name="insurance_coverage" label="小额贷款保证保险" value="12" /><span style="vertical-align: middle;">小额贷款保证保险</span></label><br/>
		<label> <input type="checkbox" class="do"  style="vertical-align: middle;" name="insurance_coverage" label="项目投资损失保险" value="13" /><span style="vertical-align: middle;">项目投资损失保险</span></label>
		<label> <input type="checkbox" class="do"  style="vertical-align: middle;" name="insurance_coverage" label="高管人员安康险" value="14" /><span style="vertical-align: middle;">高管人员安康险</span></label>
		<label> <input type="checkbox" class="do"  style="vertical-align: middle;" name="insurance_coverage" label="高管人生意外险" value="15" /><span style="vertical-align: middle;">高管人生意外险</span></label>
		<label> <input type="checkbox" class="do"  style="vertical-align: middle;" name="insurance_coverage" label="其他" value="16" /><span style="vertical-align: middle;">其他</span></label>
	    <input type="hidden" name="proposal/insurance_coverage_value" id="insurance_coverage_value" class="required" value="<x:out select="$xmlData/data/proposal/insurance_coverage_value" />" label="投保保险险种" /> 
		<input type="hidden" name="proposal/insurance_coverage_name" id="insurance_coverage_name" value="<x:out select="$xmlData/data/proposal/insurance_coverage_name" />" /></td>
	</tr>
	
	
	<tr>
	 <td  align="right" nowrap><span class="color_red">*</span>申报日期：</td>
	<td colspan="3">
		<c:set var="submit_date"><x:out select="$xmlData/data/proposal/submit_date" /></c:set>
		<cpt:date id="submit_date" name="proposal/submit_date" value="${submit_date}" className=" required date" label="申报日期"></cpt:date> 
	</td>
	</tr>
	</table>
	<br/>
	<table class="t_css" width="100%" border="0" cellpadding="0" cellspacing="1" id="basicInfo1">
	<tr>
		<td   colspan="4" class="t_bar2"><span class="color_red">*</span>申报项目资金情况</td>
	</tr>
	<tr>
		<td align="right">科技保险保费总额（万元）：</td>
		<td colspan="1"><input name="proposal/investment_budget" id="investment_budget"
			 label="科技保险保费总额" type="text" class="input_css required"
			style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)"
			value="<x:out select="$xmlData/data/proposal/investment_budget" />" /></td>
		<td align="right">科技保险保额（万元）：</td>
		<td><input name="proposal/finsh_budget" id="finsh_budget"
			 label="科技保险保额" type="text" 
			class="input_css required"  style="text-align: right"
			onfocus="InitInput.setNumber(this,9,4,2)"
			value="<x:out select="$xmlData/data/proposal/finsh_budget" />" /></td>
	</tr>
	<tr>
		<td align="right">申请金额（万元）：</td>
	    <td>
	    <input  name="proposal/sqje" id="source_apply" class="input_css required valueCompare:source_apply:request_limit" label="申请金额" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" value="<x:out select="$xmlData/data/proposal/sqje" />"/> 
	    </td>
	    <td  align="right" width="20%" >项目类别：</td>
		<td  width="30%"><x:out select="$xmlData/data/proposal/grant_name" />
		</td> 
	</tr>
	
	<tr>
	<td  align="right">支持方式：</td>
		<td>
			<span name="proposal/sponsor_category"><x:out select="$xmlData/data/proposal/sponsor_category" /></span> 
		</td>
		
		<td  align="right">资金级次：</td>
		<td>
		<span  name="proposal/fund_level">市级</span>
		</td>
	</tr>
	<tr>
	<td  align="right" nowrap>归口管理部门：</td>
		<td  ><span name="proposal/org_name">无锡市科学技术局</span> </td>
	    <td  align="right">管理类别：</td>
		<td>
		<span name="proposal/manage_category"><x:out select="$xmlData/data/proposal/manage_category" /></span>
		</td>
	</tr>
	<tr>
	    <td  align="right">功能分类：</td>
		<td  colspan="3">
		<span name="proposal/grant_function"><x:out select="$xmlData/data/proposal/grant_function"/></span>
		</td>
	</tr>
	</table>
	<br/>
	<table  width="100%" border="0" cellpadding="0" cellspacing="1">
	<tr>
		<td    class="t_bar2">申请资助依据条款</td>
		
	</tr>
	<tr>
		<td >
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<span name="proposal/policy_foundation"><x:out select="$xmlData/data/proposal/policy_foundation" /></span> 
		</td>
	</tr>
</table>
<br/>
<table class="t_css" width="100%" border="0" cellpadding="0"
	cellspacing="1" id="basicInfo2">
	<tr>
		<td class="t_bar2" colspan="8">人员信息</td>

	</tr>
	<tr>
		<td align="right"><span class="color_red">*</span>项目联系人：</td>
		<td><input name="proposal/contact_psn_cname" label="项目联系人"
			type="text" required class="input_css required" maxlength="100"
			value="<x:out select="$xmlData/data/proposal/contact_psn_cname" />" />
		</td>
		<td align="right"><span class="color_red">*</span>联系电话：</td>
		<td><input name="proposal/contact_psn_tel" label="联系电话"
			type="text" required class="input_css required" maxlength="50"
			value="<x:out select="$xmlData/data/proposal/contact_psn_tel" />" />
		</td>
		<td align="right"><span class="color_red">*</span>联系手机：</td>
		<td><input name="proposal/contact_psn_mobile" label="联系手机"
			type="text" required maxlength="11" required
			class="input_css required mobile" maxlength="20"
			value="<x:out select="$xmlData/data/proposal/contact_psn_mobile" />" />
		</td>
		<td align="right"><span class="color_red">*</span>电子邮箱：</td>
		<td><input name="proposal/contact_psn_email" label="电子邮箱"
			type="text" required class="input_css required email" maxlength="100"
			value="<x:out select="$xmlData/data/proposal/contact_psn_email" />" />
		</td>
	</tr>
	<tr>
		<td  align="right">项目负责人：</td>
		<td>
			<input  name="proposal/fzr_psncode" type="hidden" required class="input_css "   maxlength="20" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/psn_code" />"/> 
		    
		    <span name="proposal/fzr_psnname" ><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name" /></span>
		    <c:set var="psnCode"><x:out select="$xmlData/data/proposal/psn_code" /></c:set>
		    <security:authorize ifAnyGranted="A_DAILU_PROPOSAL">
				<span id="personSelect">
				<input type="button" class="button_02" style="height: 25px; padding: 1px;" id="selectPsn" value="设置">
				<cpt:personSelect key="personSelect"  addRole="3"  psnCode="${psnCode}" callback="selectPsnCall" bindEvent="click" bindObject="selectPsn" title="设置项目负责人" fltFile="personSelector.ftl"></cpt:personSelect>
				</span>
			</security:authorize>
		
		</td>
		<security:authorize ifNotGranted="A_DAILU_PROPOSAL"> 
		<td  align="right">联系电话：</td>
		<td  >
		<span name="proposal/fzr_tel"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work" /></span>
		</td>
		<td  align="right">联系手机：</td>
		<td  >
		<span name="proposal/fzr_mobile"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile" /></span>
		</td>
		</security:authorize>
		<security:authorize ifAnyGranted="A_DAILU_PROPOSAL">
		<td  align="right"><span class="color_red">*</span>联系电话：</td>
		<td  >
		<input name="proposal/fzr_tel" label="项目负责人联系电话" type="text" required  class="input_css required"  onchange="synFzrMsg(1)"  maxlength="50"  value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work" />"/>
		</td>
		<td  align="right"><span class="color_red">*</span>联系手机：</td>
		<td  >
		<input name="proposal/fzr_mobile" label="项目负责人联系手机" type="text" onchange="synFzrMsg(1)" onfocus="InitInput.setNumber(this,11,0,0)"  maxlength="11"  class="input_css required mobile"   value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile" />"/>
		</td>
		</security:authorize>
		<td  align="right">电子邮箱：</td>
		<td  >
		<span name="proposal/fzr_mail"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email" /></span>
		</td>
		
		</tr>


</table>
<script type="text/javascript">
$(function(){
	//service($("#service_value").val());
	/* changeDrugCategory();
	changeDrugApproval('drug_approvals_td');
	changeDeviceCategory();*/
});

function cydw(id){
	var count =0 ;
	$("#"+id).find("input[type='text']").each(function(){
		if($.trim($(this).val()) != ''){
			count +=1;
		}
	});
	if(count != 0){
		$("#"+id).find("input[type='text']").each(function(){
			$(this).addClass("required");
		});
		$("#"+id).find("span[id^='color']").each(function(){
			$(this).css('display','');
		});
	}else{
		$("#"+id).find("input[type='text']").each(function(){
			$(this).removeClass("required");
	});
		$("#"+id).find("span[id^='color']").each(function(){
			$(this).css('display','none');
		});
	}
}

function changeDrugCategory() {
	var val = $("#drug_category_value").val();
	var classAttr = "input_css";
	if(val == '03') {
		$("#drug_category").attr("style","display:");
		$("#drug_category").attr("class", classAttr+" required");
	} else {
		$("#drug_category").attr("style","display:none");
		$("#drug_category").attr("class", classAttr);
		$("#drug_category").val("");
	}
}

function changeDrugApproval(objId) {
	var val = $("#drug_approvals_value").val();
	$("#"+objId).find("label[id^='label0']").each(function() {
		if(val=='02') {
			$(this).attr("style","display:");
			$("#drug_approvaled_value").addClass("required");
		} else {
			$(this).attr("style","display:none");
			$("#drug_approvaled_value").removeClass("required");
		}
	});
}
function changeDeviceCategory() {
	var val = $("#medicdevice_category_value").val();
	var classAttr = "input_css";
	if(val == '03') {
		$("#medicdevice_category").attr("style","display:");
		$("#medicdevice_category").attr("class", classAttr+" required");
	} else {
		$("#medicdevice_category").attr("style","display:none");
		$("#medicdevice_category").attr("class", classAttr);
		$("#medicdevice_category").val("");
	}
}

function service(num){
	$(":input[id^=service_area_]").addClass("gray");
	$(":input[id^=service_area_]").attr("disabled",true);
	if(num=='01'){
		$(":input[id^=service_area_]").val("");
	}else{
		$("#service_area_"+num).removeClass("gray");
		$("#service_area_"+num).attr("disabled",false);
		$(":input[id^=service_area_]").not("#service_area_"+num).val("");
	}
	
}
function setValue(id){
	if("service_area_02" == id){
		$("#service_name").val($("#"+id).val()+"区");
	}
	if("service_area_03" == id){
		$("#service_name").val($("#"+id).val()+"开发区");
	}
	if("service_area_04" == id){
		$("#service_name").val("其他："+$("#"+id).val());
	}
}

function setPre(){
	var  teach_staff=$("#research_staff").val();
	var technology_staff = $("#technology_staff").val();
    var staff_total=$("#staff_total").val();
    if(staff_total==''){
    	$("#research_staff_pre").val("0.00");
    	$("#technology_staff_pre").val("0.00");
    }else{
    	 $("#research_staff_pre").val(formatVal(teach_staff*100/staff_total));
    	 $("#technology_staff_pre").val(formatVal(technology_staff*100/staff_total));
    }
   
	
}

function setPre1(){
	var  teach_staff=$("#research_num").val();
    var staff_total=$("#staff_total").val();
    if(staff_total==''){
    	$("#proportion").val("0.00");
    }else{
    $("#proportion").val(formatVal(teach_staff*100/staff_total));
    }
}
function initTreeValue2CallBack(){
	cydw('org1');
	cydw('org2');
}

function autoCountFund() {
	 var count3=0;
	 var count2=0;
	$("#tblEuipments tr:gt(1)").each(function() {
		var fund = $(this).children().eq("3").children().val();
		var fund3 = $(this).children().eq("4").children().val();
		if (!$.isNumeric(fund))  fund = "0";
		if (!$.isNumeric(fund3))  fund3 = "0";
		count2 = formatNumberAuto((parseFloat(fund)+parseFloat(count2))+"",9,0,0);
		count3 = formatNumberAuto((parseFloat(fund3)+parseFloat(count3))+"",9,4,2);
	});
	$("#amount_count").val(count2);
	$("#money_count").val(count3);
}

function setEmptyValueForTree(id){
	$("#"+id).val("");
	$("#"+id+"_hideId").val("");
	$("#"+id+"_hideName").val("");
	$("#"+id+"_code").val("");
	$("#"+id+"_value").val("");
	$("#"+id+"_name").val("");
	$("#"+id + ",[name$='/"+id+"_code']" + ",[name$='/"+id+"_name'],[name$='/"+id+"_value']").val("");
	$("#sqdm").val("");
	cydw('org1');
	cydw('org2');
}

</script>

